package com.mes.system.domain;

import javax.validation.Valid;
import java.util.List;
import javax.validation.constraints.NotBlank;

import com.mes.common.core.domain.BaseEntity;
import lombok.Data;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 编码生成规则表对象 sys_auto_code_rule
 * @author hwg
 * @email hwg
 * @date 2023-04-22
 */
@Data
public class SysAutoCodeRule extends BaseEntity<SysAutoCodeRule>
{
    private static final long serialVersionUID = 1L;

    /** 规则编码 */
    @Excel(name = "规则编码")
    @NotBlank(message = "规则编码不允许为空")
    @LogField
    @FieldRemark(name = "规则编码",field = "ruleCode")
    private String ruleCode;

    /** 规则名称 */
    @Excel(name = "规则名称")
    @NotBlank(message = "规则名称不允许为空")
    @LogField
    @FieldRemark(name = "规则名称",field = "ruleName")
    private String ruleName;

    /** 最大长度 */
    @Excel(name = "最大长度")
    @LogField
    @FieldRemark(name = "最大长度",field = "maxLength")
    private Long maxLength;

    /** 是否补齐 */
    @Excel(name = "是否补齐", dictType = "sys_yes_no")
    @NotBlank(message = "是否补齐不允许为空")
    @LogField
    @FieldRemark(name = "是否补齐",field = "isPadded")
    private String isPadded;

    /** 补齐字符 */
    @Excel(name = "补齐字符")
    @LogField
    @FieldRemark(name = "补齐字符",field = "paddedChar")
    private String paddedChar;

    /** 补齐方式 */
    @Excel(name = "补齐方式", dictType = "padded_method")
    @LogField
    @FieldRemark(name = "补齐方式",field = "paddedMethod")
    private String paddedMethod;

    /** 是否启用 */
    @Excel(name = "是否启用", dictType = "sys_yes_no")
    @NotBlank(message = "是否启用不允许为空")
    @LogField
    @FieldRemark(name = "是否启用",field = "enableFlag")
    private String enableFlag;

    /** 描述 */
    @LogField
    @FieldRemark(name = "描述",field = "ruleDesc")
    private String ruleDesc;

    /** 预留字段1 */
    private String attr1;

    /** 预留字段2 */
    private String attr2;

    /** 预留字段3 */
    private Long attr3;

    /** 预留字段4 */
    private Long attr4;

    /** 租户id */
    private String tenantId;

    /** 状态（0正常 1停用） */
    private String status;

    public void setRuleCode(String ruleCode)
    {
        this.ruleCode = ruleCode;
    }

    public String getRuleCode()
    {
        return ruleCode;
    }

    public void setRuleName(String ruleName)
    {
        this.ruleName = ruleName;
    }

    public String getRuleName()
    {
        return ruleName;
    }

    public void setMaxLength(Long maxLength)
    {
        this.maxLength = maxLength;
    }

    public Long getMaxLength()
    {
        return maxLength;
    }

    public void setIsPadded(String isPadded)
    {
        this.isPadded = isPadded;
    }

    public String getIsPadded()
    {
        return isPadded;
    }

    public void setPaddedChar(String paddedChar)
    {
        this.paddedChar = paddedChar;
    }

    public String getPaddedChar()
    {
        return paddedChar;
    }

    public void setPaddedMethod(String paddedMethod)
    {
        this.paddedMethod = paddedMethod;
    }

    public String getPaddedMethod()
    {
        return paddedMethod;
    }

    public void setEnableFlag(String enableFlag)
    {
        this.enableFlag = enableFlag;
    }

    public String getEnableFlag()
    {
        return enableFlag;
    }

    public void setRuleDesc(String ruleDesc)
    {
        this.ruleDesc = ruleDesc;
    }

    public String getRuleDesc()
    {
        return ruleDesc;
    }

    public void setAttr1(String attr1)
    {
        this.attr1 = attr1;
    }

    public String getAttr1()
    {
        return attr1;
    }

    public void setAttr2(String attr2)
    {
        this.attr2 = attr2;
    }

    public String getAttr2()
    {
        return attr2;
    }

    public void setAttr3(Long attr3)
    {
        this.attr3 = attr3;
    }

    public Long getAttr3()
    {
        return attr3;
    }

    public void setAttr4(Long attr4)
    {
        this.attr4 = attr4;
    }

    public Long getAttr4()
    {
        return attr4;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleCode", getRuleCode())
            .append("ruleName", getRuleName())
            .append("maxLength", getMaxLength())
            .append("isPadded", getIsPadded())
            .append("paddedChar", getPaddedChar())
            .append("paddedMethod", getPaddedMethod())
            .append("enableFlag", getEnableFlag())
            .append("ruleDesc", getRuleDesc())
            .append("attr1", getAttr1())
            .append("attr2", getAttr2())
            .append("attr3", getAttr3())
            .append("attr4", getAttr4())
            .append("tenantId", getTenantId())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
